package com.unionpay.mpds.model;

// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Trace entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_TRACE", uniqueConstraints = @UniqueConstraint(columnNames = "TRACE_INDEX"))
public class Trace implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -4747513218616891666L;
	private String traceIndex;
	private String branchNo;
	private String instNo;
	private String instName;
	private String shopNoP;
	private String shopNo;
	private String transPboc;
	private String cardExp;
	private String cardLevel;
	private String cardType;
	private String cardNo;
	private String issuerName;
	private String issuerCode;
	private String systemRef;
	private String transFlag;
	private String transRetdesc;
	private String transRetcode;
	private Double transAmt;
	private String transName;
	private Integer transId;
	private String posTime;
	private String posDate;
	private String posTrace;
	private String posBatch;
	private String posNo;
	private String shopName;

	// Constructors

	/** default constructor */
	public Trace() {
	}

	/** full constructor */
	public Trace(String traceIndex, String branchNo, String instNo,
			String instName, String shopNoP, String shopNo, String transPboc,
			String cardExp, String cardLevel, String cardType, String cardNo,
			String issuerName, String issuerCode, String systemRef,
			String transFlag, String transRetdesc, String transRetcode,
			Double transAmt, String transName, Integer transId,
			String posTime, String posDate, String posTrace, String posBatch,
			String posNo, String shopName) {
		this.traceIndex = traceIndex;
		this.branchNo = branchNo;
		this.instNo = instNo;
		this.instName = instName;
		this.shopNoP = shopNoP;
		this.shopNo = shopNo;
		this.transPboc = transPboc;
		this.cardExp = cardExp;
		this.cardLevel = cardLevel;
		this.cardType = cardType;
		this.cardNo = cardNo;
		this.issuerName = issuerName;
		this.issuerCode = issuerCode;
		this.systemRef = systemRef;
		this.transFlag = transFlag;
		this.transRetdesc = transRetdesc;
		this.transRetcode = transRetcode;
		this.transAmt = transAmt;
		this.transName = transName;
		this.transId = transId;
		this.posTime = posTime;
		this.posDate = posDate;
		this.posTrace = posTrace;
		this.posBatch = posBatch;
		this.posNo = posNo;
		this.shopName = shopName;
	}

	// Property accessors

	@Id
	@Column(name = "TRACE_INDEX", unique = true, nullable = false, length = 43)
	public String getTraceIndex() {
		return this.traceIndex;
	}

	public void setTraceIndex(String traceIndex) {
		this.traceIndex = traceIndex;
	}

	@Column(name = "BRANCH_NO", nullable = false, length = 15)
	public String getBranchNo() {
		return this.branchNo;
	}

	public void setBranchNo(String branchNo) {
		this.branchNo = branchNo;
	}

	@Column(name = "INST_NO", nullable = false, length = 15)
	public String getInstNo() {
		return this.instNo;
	}

	public void setInstNo(String instNo) {
		this.instNo = instNo;
	}

	@Column(name = "INST_NAME", nullable = false, length = 40)
	public String getInstName() {
		return this.instName;
	}

	public void setInstName(String instName) {
		this.instName = instName;
	}

	@Column(name = "SHOP_NO_P", nullable = false, length = 15)
	public String getShopNoP() {
		return this.shopNoP;
	}

	public void setShopNoP(String shopNoP) {
		this.shopNoP = shopNoP;
	}

	@Column(name = "SHOP_NO", nullable = false, length = 15)
	public String getShopNo() {
		return this.shopNo;
	}

	public void setShopNo(String shopNo) {
		this.shopNo = shopNo;
	}

	@Column(name = "TRANS_PBOC", nullable = false, length = 510)
	public String getTransPboc() {
		return this.transPboc;
	}

	public void setTransPboc(String transPboc) {
		this.transPboc = transPboc;
	}

	@Column(name = "CARD_EXP", nullable = false, length = 4)
	public String getCardExp() {
		return this.cardExp;
	}

	public void setCardExp(String cardExp) {
		this.cardExp = cardExp;
	}

	@Column(name = "CARD_LEVEL", nullable = false, length = 1)
	public String getCardLevel() {
		return this.cardLevel;
	}

	public void setCardLevel(String cardLevel) {
		this.cardLevel = cardLevel;
	}

	@Column(name = "CARD_TYPE", nullable = false, length = 1)
	public String getCardType() {
		return this.cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	@Column(name = "CARD_NO", nullable = false, length = 20)
	public String getCardNo() {
		return this.cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Column(name = "ISSUER_NAME", nullable = false, length = 20)
	public String getIssuerName() {
		return this.issuerName;
	}

	public void setIssuerName(String issuerName) {
		this.issuerName = issuerName;
	}

	@Column(name = "ISSUER_CODE", nullable = false, length = 8)
	public String getIssuerCode() {
		return this.issuerCode;
	}

	public void setIssuerCode(String issuerCode) {
		this.issuerCode = issuerCode;
	}

	@Column(name = "SYSTEM_REF", nullable = false, length = 12)
	public String getSystemRef() {
		return this.systemRef;
	}

	public void setSystemRef(String systemRef) {
		this.systemRef = systemRef;
	}

	@Column(name = "TRANS_FLAG", nullable = false, length = 1)
	public String getTransFlag() {
		return this.transFlag;
	}

	public void setTransFlag(String transFlag) {
		this.transFlag = transFlag;
	}

	@Column(name = "TRANS_RETDESC", nullable = false, length = 40)
	public String getTransRetdesc() {
		return this.transRetdesc;
	}

	public void setTransRetdesc(String transRetdesc) {
		this.transRetdesc = transRetdesc;
	}

	@Column(name = "TRANS_RETCODE", nullable = false, length = 2)
	public String getTransRetcode() {
		return this.transRetcode;
	}

	public void setTransRetcode(String transRetcode) {
		this.transRetcode = transRetcode;
	}

	@Column(name = "TRANS_AMT", nullable = false, precision = 15)
	public Double getTransAmt() {
		return this.transAmt;
	}

	public void setTransAmt(Double transAmt) {
		this.transAmt = transAmt;
	}

	@Column(name = "TRANS_NAME", nullable = false, length = 20)
	public String getTransName() {
		return this.transName;
	}

	public void setTransName(String transName) {
		this.transName = transName;
	}

	@Column(name = "TRANS_ID", nullable = false)
	public Integer getTransId() {
		return this.transId;
	}

	public void setTransId(Integer transId) {
		this.transId = transId;
	}

	@Column(name = "POS_TIME", nullable = false, length = 6)
	public String getPosTime() {
		return this.posTime;
	}

	public void setPosTime(String posTime) {
		this.posTime = posTime;
	}

	@Column(name = "POS_DATE", nullable = false, length = 8)
	public String getPosDate() {
		return this.posDate;
	}

	public void setPosDate(String posDate) {
		this.posDate = posDate;
	}

	@Column(name = "POS_TRACE", nullable = false, length = 6)
	public String getPosTrace() {
		return this.posTrace;
	}

	public void setPosTrace(String posTrace) {
		this.posTrace = posTrace;
	}

	@Column(name = "POS_BATCH", nullable = false, length = 6)
	public String getPosBatch() {
		return this.posBatch;
	}

	public void setPosBatch(String posBatch) {
		this.posBatch = posBatch;
	}

	@Column(name = "POS_NO", nullable = false, length = 15)
	public String getPosNo() {
		return this.posNo;
	}

	public void setPosNo(String posNo) {
		this.posNo = posNo;
	}

	@Column(name = "SHOP_NAME", nullable = false, length = 20)
	public String getShopName() {
		return this.shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof Trace))
			return false;
		Trace castOther = (Trace) other;

		return ((this.getTraceIndex() == castOther.getTraceIndex()) || (this
				.getTraceIndex() != null && castOther.getTraceIndex() != null && this
				.getTraceIndex().equals(castOther.getTraceIndex())))
				&& ((this.getBranchNo() == castOther.getBranchNo()) || (this
						.getBranchNo() != null
						&& castOther.getBranchNo() != null && this
						.getBranchNo().equals(castOther.getBranchNo())))
				&& ((this.getInstNo() == castOther.getInstNo()) || (this
						.getInstNo() != null && castOther.getInstNo() != null && this
						.getInstNo().equals(castOther.getInstNo())))
				&& ((this.getInstName() == castOther.getInstName()) || (this
						.getInstName() != null
						&& castOther.getInstName() != null && this
						.getInstName().equals(castOther.getInstName())))
				&& ((this.getShopNoP() == castOther.getShopNoP()) || (this
						.getShopNoP() != null && castOther.getShopNoP() != null && this
						.getShopNoP().equals(castOther.getShopNoP())))
				&& ((this.getShopNo() == castOther.getShopNo()) || (this
						.getShopNo() != null && castOther.getShopNo() != null && this
						.getShopNo().equals(castOther.getShopNo())))
				&& ((this.getTransPboc() == castOther.getTransPboc()) || (this
						.getTransPboc() != null
						&& castOther.getTransPboc() != null && this
						.getTransPboc().equals(castOther.getTransPboc())))
				&& ((this.getCardExp() == castOther.getCardExp()) || (this
						.getCardExp() != null && castOther.getCardExp() != null && this
						.getCardExp().equals(castOther.getCardExp())))
				&& ((this.getCardLevel() == castOther.getCardLevel()) || (this
						.getCardLevel() != null
						&& castOther.getCardLevel() != null && this
						.getCardLevel().equals(castOther.getCardLevel())))
				&& ((this.getCardType() == castOther.getCardType()) || (this
						.getCardType() != null
						&& castOther.getCardType() != null && this
						.getCardType().equals(castOther.getCardType())))
				&& ((this.getCardNo() == castOther.getCardNo()) || (this
						.getCardNo() != null && castOther.getCardNo() != null && this
						.getCardNo().equals(castOther.getCardNo())))
				&& ((this.getIssuerName() == castOther.getIssuerName()) || (this
						.getIssuerName() != null
						&& castOther.getIssuerName() != null && this
						.getIssuerName().equals(castOther.getIssuerName())))
				&& ((this.getIssuerCode() == castOther.getIssuerCode()) || (this
						.getIssuerCode() != null
						&& castOther.getIssuerCode() != null && this
						.getIssuerCode().equals(castOther.getIssuerCode())))
				&& ((this.getSystemRef() == castOther.getSystemRef()) || (this
						.getSystemRef() != null
						&& castOther.getSystemRef() != null && this
						.getSystemRef().equals(castOther.getSystemRef())))
				&& ((this.getTransFlag() == castOther.getTransFlag()) || (this
						.getTransFlag() != null
						&& castOther.getTransFlag() != null && this
						.getTransFlag().equals(castOther.getTransFlag())))
				&& ((this.getTransRetdesc() == castOther.getTransRetdesc()) || (this
						.getTransRetdesc() != null
						&& castOther.getTransRetdesc() != null && this
						.getTransRetdesc().equals(castOther.getTransRetdesc())))
				&& ((this.getTransRetcode() == castOther.getTransRetcode()) || (this
						.getTransRetcode() != null
						&& castOther.getTransRetcode() != null && this
						.getTransRetcode().equals(castOther.getTransRetcode())))
				&& ((this.getTransAmt() == castOther.getTransAmt()) || (this
						.getTransAmt() != null
						&& castOther.getTransAmt() != null && this
						.getTransAmt().equals(castOther.getTransAmt())))
				&& ((this.getTransName() == castOther.getTransName()) || (this
						.getTransName() != null
						&& castOther.getTransName() != null && this
						.getTransName().equals(castOther.getTransName())))
				&& ((this.getTransId() == castOther.getTransId()) || (this
						.getTransId() != null && castOther.getTransId() != null && this
						.getTransId().equals(castOther.getTransId())))
				&& ((this.getPosTime() == castOther.getPosTime()) || (this
						.getPosTime() != null && castOther.getPosTime() != null && this
						.getPosTime().equals(castOther.getPosTime())))
				&& ((this.getPosDate() == castOther.getPosDate()) || (this
						.getPosDate() != null && castOther.getPosDate() != null && this
						.getPosDate().equals(castOther.getPosDate())))
				&& ((this.getPosTrace() == castOther.getPosTrace()) || (this
						.getPosTrace() != null
						&& castOther.getPosTrace() != null && this
						.getPosTrace().equals(castOther.getPosTrace())))
				&& ((this.getPosBatch() == castOther.getPosBatch()) || (this
						.getPosBatch() != null
						&& castOther.getPosBatch() != null && this
						.getPosBatch().equals(castOther.getPosBatch())))
				&& ((this.getPosNo() == castOther.getPosNo()) || (this
						.getPosNo() != null && castOther.getPosNo() != null && this
						.getPosNo().equals(castOther.getPosNo())))
				&& ((this.getShopName() == castOther.getShopName()) || (this
						.getShopName() != null
						&& castOther.getShopName() != null && this
						.getShopName().equals(castOther.getShopName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getTraceIndex() == null ? 0 : this.getTraceIndex()
						.hashCode());
		result = 37 * result
				+ (getBranchNo() == null ? 0 : this.getBranchNo().hashCode());
		result = 37 * result
				+ (getInstNo() == null ? 0 : this.getInstNo().hashCode());
		result = 37 * result
				+ (getInstName() == null ? 0 : this.getInstName().hashCode());
		result = 37 * result
				+ (getShopNoP() == null ? 0 : this.getShopNoP().hashCode());
		result = 37 * result
				+ (getShopNo() == null ? 0 : this.getShopNo().hashCode());
		result = 37 * result
				+ (getTransPboc() == null ? 0 : this.getTransPboc().hashCode());
		result = 37 * result
				+ (getCardExp() == null ? 0 : this.getCardExp().hashCode());
		result = 37 * result
				+ (getCardLevel() == null ? 0 : this.getCardLevel().hashCode());
		result = 37 * result
				+ (getCardType() == null ? 0 : this.getCardType().hashCode());
		result = 37 * result
				+ (getCardNo() == null ? 0 : this.getCardNo().hashCode());
		result = 37
				* result
				+ (getIssuerName() == null ? 0 : this.getIssuerName()
						.hashCode());
		result = 37
				* result
				+ (getIssuerCode() == null ? 0 : this.getIssuerCode()
						.hashCode());
		result = 37 * result
				+ (getSystemRef() == null ? 0 : this.getSystemRef().hashCode());
		result = 37 * result
				+ (getTransFlag() == null ? 0 : this.getTransFlag().hashCode());
		result = 37
				* result
				+ (getTransRetdesc() == null ? 0 : this.getTransRetdesc()
						.hashCode());
		result = 37
				* result
				+ (getTransRetcode() == null ? 0 : this.getTransRetcode()
						.hashCode());
		result = 37 * result
				+ (getTransAmt() == null ? 0 : this.getTransAmt().hashCode());
		result = 37 * result
				+ (getTransName() == null ? 0 : this.getTransName().hashCode());
		result = 37 * result
				+ (getTransId() == null ? 0 : this.getTransId().hashCode());
		result = 37 * result
				+ (getPosTime() == null ? 0 : this.getPosTime().hashCode());
		result = 37 * result
				+ (getPosDate() == null ? 0 : this.getPosDate().hashCode());
		result = 37 * result
				+ (getPosTrace() == null ? 0 : this.getPosTrace().hashCode());
		result = 37 * result
				+ (getPosBatch() == null ? 0 : this.getPosBatch().hashCode());
		result = 37 * result
				+ (getPosNo() == null ? 0 : this.getPosNo().hashCode());
		result = 37 * result
				+ (getShopName() == null ? 0 : this.getShopName().hashCode());
		return result;
	}

}